package com.hp.gxw.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author huangping
 * @since 2020-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysUser extends Model<SysUser> implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 用户账号
     */
    @TableField("user_code")
    private String userCode;
    /**
     * 用户名称
     */
    @TableField("user_name")
    private String userName;
    /**
     * 电话
     */
    @TableField("user_phone")
    private String userPhone;
    /**
     * 年龄
     */
    @TableField("user_age")
    private String userAge;
    /**
     * 性别
     */
    @TableField("user_sex")
    private String userSex;
    /**
     * 地址
     */
    @TableField("user_addr")
    private String userAddr;
    /**
     * 邮箱
     */
    @TableField("user_email")
    private String userEmail;
    /**
     * 部门id
     */
    @TableField("department_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long departmentId;
    /**
     * 角色
     */
    @TableField("role_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private String roleId;
    /**
     * 微信openid
     */
    @TableField("open_id")
    private String openId;
    /**
     * 密码
     */
    @TableField("user_password")
    private String userPassword;
    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;

    @TableField(exist=false)
    private String departmentName;
    
    @TableField(exist=false)
    private String roleName;

    @TableField(exist=false)
    private String pdRoleName;
}